﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Easydp.Models.Entities;
using Easydp.Controllers;
using System.Configuration;
namespace Web.Views.Common
{
    public partial class WaitPay : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(Request.QueryString["OrderID"]))
              Response.Redirect("~/Views/Shared/ErrorPage.aspx?Error=1");
            OrderController orderControl = new OrderController();
            TT_Orders orderObj = orderControl.GetWaitPayOrder(Request.QueryString["OrderID"].ToString());
            //TT_Orders orderObj = orderControl.GetWaitPayOrder("55");//测试
            if (orderObj.OrderID >0 )
            {
                spanOrderNum.InnerText = string.Format("{2}({0}--{1})", orderObj.StartStation, orderObj.EndStation, orderObj.OrderNum);
                spanPayMoney.InnerText = orderObj.PayMoney.ToString("F");
                OrderID.Value = orderObj.OrderID.ToString(); ;
            }
            else
            {
                Response.Redirect("~/Default.aspx");
            }
            
        }
    }
}
